import { request } from './request';

/**
 * 查询最新步数记录
 * @param patientUid 患者ID
 */
export function getLatestStepCount(patientUid: string) {
  return request({
    url: `/patient/step-count/latest/${patientUid}`,
    method: 'GET'
  });
}

/**
 * 分页查询步数记录
 * @param patientUid 患者ID
 * @param params 分页参数
 */
export function getStepCountPage(patientUid: string, params: { pageNum: number; pageSize: number; sortField?: string; sortOrder?: string }) {
  return request({
    url: `/patient/step-count/page/${patientUid}`,
    method: 'GET',
    data: params
  });
}

/**
 * 按日期查询步数记录
 * @param patientUid 患者ID
 * @param params 日期参数 { date: string }
 */
export function getStepCountByDate(patientUid: string, params: { date: string }) {
  return request({
    url: `/patient/step-count/by-date/${patientUid}`,
    method: 'GET',
    data: params
  });
}

/**
 * 查询所有步数记录
 * @param patientUid 患者ID
 */
export function getAllStepCount(patientUid: string) {
  return request({
    url: `/patient/step-count/all/${patientUid}`,
    method: 'GET'
  });
}
